package com.hfi.ood.litejunit.v3.biz.person;

import com.hfi.ood.litejunit.v3.framework.annotation.After;
import com.hfi.ood.litejunit.v3.framework.annotation.Before;
import com.hfi.ood.litejunit.v3.framework.annotation.Test;

import static com.hfi.ood.litejunit.v3.framework.Assert.assertEquals;

/**
 * @author ChangLiang
 * @date 2020/5/28
 */
public class PersonTest {
    Person p = null;

    @Before
    public void setUp() {
        p = new Person("andy", 30);
    }

    @After
    public void tearDown() {
        p = null;
    }

    @Test
    public void testAge() {
        assertEquals(30,p.getAge());
    }

    @Test
    public void testName() {
        assertEquals("andyy",p.getName());
    }
}

class Person {
    private String name;
    private int age;

    public Person(String name, int age) {

        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }
}